/* 
 *  javascribd - Java client library for the Scribd API. 
 *  Copyright (C) 2009 by Marcel Eyke, http://code.google.com/p/javascribd/ 
 *  Use is subject to license terms of LGPL. See license.txt. 
 */
package com.google.code.javascribd.type;

public class SecretKey {
	private final String secretKey;

	public SecretKey(String secretKey) {
		if (secretKey == null) {
			throw new IllegalArgumentException("secretKey must be not null");
		}
		this.secretKey = secretKey;
	}

	@Override
	public int hashCode() {
		assert secretKey != null;
		return secretKey.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SecretKey other = (SecretKey) obj;
		assert secretKey != null;
		assert other.secretKey != null;
		return secretKey.equals(other.secretKey);
	}

	@Override
	public String toString() {
		assert secretKey != null;
		return secretKey.toString();
	}
}
